package com.library_manage_system.button;

import java.awt.Dimension;
import java.awt.Font;
import java.awt.Insets;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.plaf.basic.BasicButtonUI;

public class ClarityButton extends ButtonDecrator {

	AbtractButton abtractButton;

	public ClarityButton(AbtractButton abtractButton) {
		this.abtractButton = abtractButton;
	}

	@Override
	public JButton beautify() {
		// 设置按钮透明
		button = abtractButton.beautify();
		button.setUI(new BasicButtonUI());// 恢复基本视觉效果
		button.setPreferredSize(new Dimension(80, 27));// 设置按钮大小
		button.setContentAreaFilled(false);// 设置按钮透明
		button.setFont(new Font("粗体", Font.PLAIN, 15));// 按钮文本样式
		button.setMargin(new Insets(0, 0, 0, 0));// 按钮内容与边框距离
		return button;

	}
}
